package com.zjm.servlet.servlet09_two_create;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author ZJM
 * @date 2024/4/14 17:42
 * 第二种配置请求路径方式，使用注解
 *
 * name:Servlet名字
 * value:配置url路径，可多个
 * urlPatterns：和value一样，不能同时使用
 * loadOnStartup：Servlet创建时机，0或正数启是时创建，负数访问时创建，数字越小优先级越高
 */
// @WebServlet("/create2/*")
// @WebServlet(name = "create2",urlPatterns = {"/urlTest"} ,loadOnStartup = 0)
@WebServlet(name = "create2",value = {"/c","/cre","/create"} ,loadOnStartup = 0)
public class Create02Servlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
    }
}
